package com.hangzhou.xyj.ui.activity;

import android.support.v4.view.ViewPager;

import com.hangzhou.xyj.R;
import com.hangzhou.xyj.manager.IntentManager;
import com.hangzhou.xyj.ui.activity.base.BaseActivity;
import com.hangzhou.xyj.ui.adapter.FindActionAdapter;
import com.hangzhou.xyj.ui.widget.CommonTitleBarView;
import com.hangzhou.xyj.ui.widget.PagerSlidingTabStrip;

/**
 * Created by Administrator on 2016/1/15.
 */
public class FindActionActivity extends BaseActivity {
    private PagerSlidingTabStrip mViewPagerTab;
    private ViewPager mViewPager;
    @Override
    public void initTop() {
        enableTitle(true,"活动");
        enableRightNav(true, R.drawable.ic_publish);
        //发布活动
        setOnNavRightListener(new CommonTitleBarView.OnNavRightListener() {
            @Override
            public void onNavRight() {
                IntentManager.getInstance().goPublishActActivity(mContext);
            }
        });
    }

    @Override
    public void initLayouts() {
        setContentView(R.layout.activity_find_action);
    }

    @Override
    public void initViews() {
        mViewPager = findView(R.id.find_action_viewpager);
        mViewPagerTab = findView(R.id.find_action_tabs);
    }

    @Override
    public void initDatas() {
        mViewPager.setAdapter(new FindActionAdapter(getSupportFragmentManager()));
        mViewPagerTab.setViewPager(mViewPager);
        mViewPager.setCurrentItem(0);
    }

    @Override
    public void initListeners() {

    }
}
